package com.dragon.modules.yuegou.model.member;

import com.dragon.modules.yuegou.entity.member.WxOpenidRefEntity;
import com.dragon.modules.yuegou.enums.member.WxOpenidRefOpenIdType;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * 会员openid关系表模型类
 * 
 * @author pbuilder generated
 * @date 2019-03-16 15:13:13
 * @company sgy
 * @version 2.0
 * @see Length 长度限制
 * @see NotNull 对象非空
 * @see NotEmpty 字符串、集合、表、数组非空
 */
public class WxOpenidRef extends WxOpenidRefEntity {

	/**
	 * 构造一个空会员openid关系表模型对象
	 */
	public WxOpenidRef(){
		super();
	}
	
	/**
	 * 依据实体对象的信息构造一个会员openid关系表模型对象
	 * 
	 * @param entity 实体对象
	 */
	public WxOpenidRef(WxOpenidRefEntity entity){
		super(entity);
	}

	/**
	 * 依据其它对象的信息构造一个会员openid关系表模型对象
	 * 
	 * @param other 其它对象
	 */
	public WxOpenidRef(WxOpenidRef other){
		super(other);
	}


	@Override
	public String getId() {
    	return id;
    }

    /**
	 * 设置
	 * 
	 * @param id 
	 * @return 当前对象
	 */
    public WxOpenidRef id(String id) {
    	this.id = id;
    	return this;
    }

	@Override
	public String getMemberId() {
    	return memberId;
    }

    /**
	 * 设置会员id
	 * 
	 * @param memberId 会员id
	 * @return 当前对象
	 */
    public WxOpenidRef memberId(String memberId) {
    	this.memberId = memberId;
    	return this;
    }

	@Override
	public String getWxUnionId() {
    	return wxUnionId;
    }

    /**
	 * 设置
	 * 
	 * @param wxUnionId 
	 * @return 当前对象
	 */
    public WxOpenidRef wxUnionId(String wxUnionId) {
    	this.wxUnionId = wxUnionId;
    	return this;
    }

	@Override
	public String getWxOpenId() {
    	return wxOpenId;
    }

    /**
	 * 设置
	 * 
	 * @param wxOpenId 
	 * @return 当前对象
	 */
    public WxOpenidRef wxOpenId(String wxOpenId) {
    	this.wxOpenId = wxOpenId;
    	return this;
    }

	@Override
	public String getAliAppid() {
    	return aliAppid;
    }

    /**
	 * 设置支付宝appid
	 * 
	 * @param aliAppid 支付宝appid
	 * @return 当前对象
	 */
    public WxOpenidRef aliAppid(String aliAppid) {
    	this.aliAppid = aliAppid;
    	return this;
    }

	@Override
	public WxOpenidRefOpenIdType getOpenIdType() {
    	return openIdType;
    }

    /**
	 * 设置[枚举]openid类型：0-悦购小程序-YGIRL、1-悦荷包小程序-WALLET、2-悦商圈公众号-YSQ、3-安卓APP-ANDRIOD、4-IOS-IOS、5-支付宝-ALIPAY、6-答题小程序-TCXDT、7-支付宝小程序-ALIXCX
	 * 
	 * @param openIdType [枚举]openid类型：0-悦购小程序-YGIRL、1-悦荷包小程序-WALLET、2-悦商圈公众号-YSQ、3-安卓APP-ANDRIOD、4-IOS-IOS、5-支付宝-ALIPAY、6-答题小程序-TCXDT、7-支付宝小程序-ALIXCX
	 * @return 当前对象
	 */
    public WxOpenidRef openIdType(WxOpenidRefOpenIdType openIdType) {
    	this.openIdType = openIdType;
    	return this;
    }

	@Override
	public String getAppid() {
    	return appid;
    }

    /**
	 * 设置第三方 appid
	 * 
	 * @param appid 第三方 appid
	 * @return 当前对象
	 */
    public WxOpenidRef appid(String appid) {
    	this.appid = appid;
    	return this;
    }

	@Override
	public LocalDateTime getCreatedTime() {
    	return createdTime;
    }

    /**
	 * 设置
	 * 
	 * @param createdTime 
	 * @return 当前对象
	 */
    public WxOpenidRef createdTime(LocalDateTime createdTime) {
    	this.createdTime = createdTime;
    	return this;
    }
}
